﻿Public Class Persona
    Private _DNI As String
    Private _APEPAT As String
    Private _APEMAT As String
    Private _NOMBRES As String
    Private _SEXO As String
    Private _FECNAC As String
    Private _DIREC As String
    Private _DISTRITO As String
    Private _TELEFONO As String
    Private _CELULAR As String

    ''' <summary>
    ''' Construye una instancia del usuario con sus datos completos.
    ''' </summary>

    Public Sub New(ByVal Dni As String, ByVal ApePat As String, ByVal ApeMat As String, ByVal Nombres As String, ByVal Sexo As String, _
                   ByVal FecNac As String, ByVal Direc As String, ByVal Distrito As String, ByVal Telefono As String, ByVal Celular As String)
        Me._DNI = Dni
        Me._APEPAT = ApePat
        Me._APEMAT = ApeMat
        Me._NOMBRES = Nombres
        Me._SEXO = Sexo
        Me._FECNAC = FecNac
        Me._DIREC = Direc
        Me._DISTRITO = Distrito
        Me._TELEFONO = Telefono
        Me._CELULAR = Celular
    End Sub

    Public Property DNI() As String
        Get
            Return Me._DNI
        End Get
        Private Set(ByVal Value As String)
            If Value.Equals(String.Empty) Then
                Throw New ArgumentException("Dato Inválido.")
            End If
            Me._DNI = Value
        End Set
    End Property

    Public Property APEPAT() As String
        Get
            Return Me._APEPAT
        End Get
        Private Set(ByVal Value As String)
            If Value.Equals(String.Empty) Then
                Throw New ArgumentException("Dato Inválido.")
            End If
            Me._APEPAT = Value
        End Set
    End Property


    Public Property APEMAT() As String
        Get
            Return Me._APEMAT
        End Get
        Private Set(ByVal Value As String)
            If Value.Equals(String.Empty) Then
                Throw New ArgumentException("Dato Inválido.")
            End If
            Me._APEMAT = Value
        End Set
    End Property
    Public Property NOMBRES() As String
        Get
            Return Me._NOMBRES
        End Get
        Private Set(ByVal Value As String)
            If Value.Equals(String.Empty) Then
                Throw New ArgumentException("Dato Inválido.")
            End If
            Me._NOMBRES = Value
        End Set
    End Property
    Public Property SEXO() As String
        Get
            Return Me._SEXO
        End Get
        Private Set(ByVal Value As String)
            If Value.Equals(String.Empty) Then
                Throw New ArgumentException("Dato Inválido.")
            End If
            Me._SEXO = Value
        End Set
    End Property
    Public Property DIREC() As String
        Get
            Return Me._DIREC
        End Get
        Private Set(ByVal Value As String)
            If Value.Equals(String.Empty) Then
                Throw New ArgumentException("Dato Inválido.")
            End If
            Me._DIREC = Value
        End Set
    End Property
    Public Property DISTRITO() As String
        Get
            Return Me._DISTRITO
        End Get
        Private Set(ByVal Value As String)
            If Value.Equals(String.Empty) Then
                Throw New ArgumentException("Dato Inválido.")
            End If
            Me._DISTRITO = Value
        End Set
    End Property
    Public Property TELEFONO() As String
        Get
            Return Me._TELEFONO
        End Get
        Private Set(ByVal Value As String)
            If Value.Equals(String.Empty) Then
                Throw New ArgumentException("Dato Inválido.")
            End If
            Me._TELEFONO = Value
        End Set
    End Property
    Public Property CELULAR() As String
        Get
            Return Me._CELULAR
        End Get
        Private Set(ByVal Value As String)
            If Value.Equals(String.Empty) Then
                Throw New ArgumentException("Dato Inválido.")
            End If
            Me._CELULAR = Value
        End Set
    End Property
    Public Property FECNAC() As String
        Get
            Return Me._FECNAC
        End Get
        Private Set(ByVal Value As String)
            If Value.Equals(String.Empty) Then
                Throw New ArgumentException("Dato Inválido.")
            End If
            Me._FECNAC = Value
        End Set
    End Property
End Class
